<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="main.css"/>
</head>
<body>
    <marquee>
        <h1>marquee实现的跑马灯</h1>
    </marquee>
    <input class="info" name="uname" value="John"/>
    <br>
    <button class="info">发送给原生组件</button>
    <script>
        document.querySelector('button').addEventListener('click'
        ,()=>{
            
            let uname=document.querySelector('input[name="uname"]').value
            let msg=JSON.stringify({uname})
             window.ReactNativeWebView.postMessage(msg)
        })
    </script>
</body>
</html>